// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: AdminSetMailServiceAction.java

package com.market.web.action;

import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.springframework.beans.BeanUtils;

import com.market.web.XMLLoader;
import com.market.web.mail.MailInfo;

// Referenced classes of package com.market.web.action:
// BaseAction

public class AdminSetMailServiceAction extends BaseAction2
{

    public AdminSetMailServiceAction()
    {
    }
    public String getFrom()
    {
        return from;
    }

    public void setFrom(String from)
    {
        this.from = from;
    }

    public String getPassword()
    {
        return password;
    }

    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getSmtp()
    {
        return smtp;
    }

    public void setSmtp(String smtp)
    {
        this.smtp = smtp;
    }

    public String getUsername()
    {
        return username;
    }

    public void setUsername(String username)
    {
        this.username = username;
    }

    private String username;

    private String password;

    private String smtp;

    private String from;

    public String execute() throws Exception
    {
        //MailServiceForm mailf = (MailServiceForm)form;
        MailInfo mail = new MailInfo();
        BeanUtils.copyProperties(this, mail);
        XMLLoader.setMailInfo(mail);
        ActionMessages message = new ActionMessages();
        message.add("org.apache.struts.action.GLOBAL_MESSAGE", new ActionMessage(
                "\u90AE\u4EF6\u670D\u52A1\u5668\u4FE1\u606F\u8BBE\u7F6E\u6210\u529F", false));
        //saveMessages(getRequest(), message);
        return SUCCESS;//mapping.findForward("success");
    }
}
